home *** CD-ROM | disk | FTP | other *** search
/ Insight Into Information (Demo) / Insight Into Information Demo CD-ROM 1994.ISO / avi.inc < prev    next >
Encoding:
Text File  |  1993-09-29  |  1.7 KB  |  60 lines

  1. '**************************************************************************
  2. '*                       VfW 1.0 Runtime Setup
  3. '*            include file for Microsoft Multimedia Publishing
  4. '**************************************************************************
  5.  
  6. DECLARE FUNCTION AreAVIFilesInstalled() AS INTEGER
  7. DECLARE SUB CopyAVIFiles
  8. DECLARE SUB SetAVIIniFiles
  9.  
  10. AVIFOROPENERS:
  11.     'Make sure the startup for the main script is called INIT.
  12.  
  13.     GoTo INIT
  14.  
  15.  
  16. Sub CopyAVIFiles STATIC
  17.     'Setting RUNTIME files to be copied
  18.  
  19.     AVISrcDir$ = GetSymbolValue("STF_SRCDIR")
  20.  
  21.     AddSectionFilesToCopyList "VfW Runtime", AVISrcDir$, GetWindowsSysDir()
  22. End Sub
  23.  
  24.  
  25. Sub SetAVIIniFiles STATIC
  26.     'This routine should be run whether or not the files are copied.
  27.     'This is because the existence of the files on disk is not a
  28.     'guarantee of correct installation!
  29.  
  30.     'Updating WIN.INI and SYSTEM.INI
  31.  
  32.     CreateIniKeyValue GetWindowsDir() + "win.ini",    "mci extensions", "avi", "AVIVideo", cmoOverwrite
  33.     CreateIniKeyValue GetWindowsDir() + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
  34. End Sub
  35.  
  36.  
  37. '**
  38. '** Purpose:
  39. '**     Determine if AVI files are already installed
  40. '** Returns:
  41. '**     True if AVI is installed, FALSE if not.
  42. '*************************************************************************
  43. FUNCTION AreAVIFilesInstalled() STATIC AS INTEGER
  44.     SysDir$ = GetWindowsSysDir()
  45.  
  46.     'Innocent until proven guilty!
  47.  
  48.     AreAVIFilesInstalled = 1
  49.  
  50.     If DoesFileExist (SysDir$ + "mciavi.drv", femExists) = 0 Then
  51.         AreAVIFilesInstalled = 0
  52.     End If
  53.  
  54.     If DoesFileExist (SysDir$ + "msvideo.dll", femExists) = 0 Then
  55.         AreAVIFilesInstalled = 0
  56.     End If
  57.  
  58. END FUNCTION
  59.  
  60.